diff --git a/tools/dtoc/dtoc.py b/tools/dtoc/dtoc.py
index 10f6a12..518aa51 100755
--- a/tools/dtoc/dtoc.py
+++ b/tools/dtoc/dtoc.py
@@ -16,6 +16,7 @@
 our_path = os.path.dirname(os.path.realpath(__file__))
 sys.path.append(os.path.join(our_path, '../patman'))
 
+import fdt
 import fdt_select
 import fdt_util
 
@@ -33,10 +34,10 @@
 
 # C type declarations for the tyues we support
 TYPE_NAMES = {
-    fdt_util.TYPE_INT: 'fdt32_t',
-    fdt_util.TYPE_BYTE: 'unsigned char',
-    fdt_util.TYPE_STRING: 'const char *',
-    fdt_util.TYPE_BOOL: 'bool',
+    fdt.TYPE_INT: 'fdt32_t',
+    fdt.TYPE_BYTE: 'unsigned char',
+    fdt.TYPE_STRING: 'const char *',
+    fdt.TYPE_BOOL: 'bool',
 };
 
 STRUCT_PREFIX = 'dtd_'
@@ -138,13 +139,13 @@
             type: Data type (fdt_util)
             value: Data value, as a string of bytes
         """
-        if type == fdt_util.TYPE_INT:
+        if type == fdt.TYPE_INT:
             return '%#x' % fdt_util.fdt32_to_cpu(value)
-        elif type == fdt_util.TYPE_BYTE:
+        elif type == fdt.TYPE_BYTE:
             return '%#x' % ord(value[0])
-        elif type == fdt_util.TYPE_STRING:
+        elif type == fdt.TYPE_STRING:
             return '"%s"' % value
-        elif type == fdt_util.TYPE_BOOL:
+        elif type == fdt.TYPE_BOOL:
             return 'true'
 
     def GetCompatName(self, node):
diff --git a/tools/dtoc/fdt.py b/tools/dtoc/fdt.py
index 413d45d..329d03c 100644
--- a/tools/dtoc/fdt.py
+++ b/tools/dtoc/fdt.py
@@ -17,6 +17,9 @@
 # implementation is in the FdtFallback and FdtNormal subclasses. See
 # fdt_select.py for how to create an Fdt object.
 
+# A list of types we support
+(TYPE_BYTE, TYPE_INT, TYPE_STRING, TYPE_BOOL) = range(4)
+
 def CheckErr(errnum, msg):
     if errnum:
         raise ValueError('Error %d: %s: %s' %
@@ -37,6 +40,69 @@
         self.name = name
         self.value = None
 
+    def BytesToValue(self, bytes):
+        """Converts a string of bytes into a type and value
+
+        Args:
+            A string containing bytes
+
+        Return:
+            A tuple:
+                Type of data
+                Data, either a single element or a list of elements. Each element
+                is one of:
+                    TYPE_STRING: string value from the property
+                    TYPE_INT: a byte-swapped integer stored as a 4-byte string
+                    TYPE_BYTE: a byte stored as a single-byte string
+        """
+        size = len(bytes)
+        strings = bytes.split('\0')
+        is_string = True
+        count = len(strings) - 1
+        if count > 0 and not strings[-1]:
+            for string in strings[:-1]:
+                if not string:
+                    is_string = False
+                    break
+                for ch in string:
+                    if ch < ' ' or ch > '~':
+                        is_string = False
+                        break
+        else:
+            is_string = False
+        if is_string:
+            if count == 1:
+                return TYPE_STRING, strings[0]
+            else:
+                return TYPE_STRING, strings[:-1]
+        if size % 4:
+            if size == 1:
+                return TYPE_BYTE, bytes[0]
+            else:
+                return TYPE_BYTE, list(bytes)
+        val = []
+        for i in range(0, size, 4):
+            val.append(bytes[i:i + 4])
+        if size == 4:
+            return TYPE_INT, val[0]
+        else:
+            return TYPE_INT, val
+
+    def GetEmpty(self, type):
+        """Get an empty / zero value of the given type
+
+        Returns:
+            A single value of the given type
+        """
+        if type == TYPE_BYTE:
+            return chr(0)
+        elif type == TYPE_INT:
+            return struct.pack('<I', 0);
+        elif type == TYPE_STRING:
+            return ''
+        else:
+            return True
+
 class NodeBase:
     """A device tree node
 
diff --git a/tools/dtoc/fdt_fallback.py b/tools/dtoc/fdt_fallback.py
index be3b5ba..798c510 100644
--- a/tools/dtoc/fdt_fallback.py
+++ b/tools/dtoc/fdt_fallback.py
@@ -31,11 +31,11 @@
     def __init__(self, node, name, byte_list_str):
         PropBase.__init__(self, node, 0, name)
         if not byte_list_str.strip():
-            self.type = fdt_util.TYPE_BOOL
+            self.type = fdt.TYPE_BOOL
             return
         self.bytes = [chr(int(byte, 16))
                       for byte in byte_list_str.strip().split(' ')]
-        self.type, self.value = fdt_util.BytesToValue(''.join(self.bytes))
+        self.type, self.value = self.BytesToValue(''.join(self.bytes))
 
     def GetPhandle(self):
         """Get a (single) phandle value from a property
diff --git a/tools/dtoc/fdt_normal.py b/tools/dtoc/fdt_normal.py
index ca5335b..c7c86b8 100644
--- a/tools/dtoc/fdt_normal.py
+++ b/tools/dtoc/fdt_normal.py
@@ -33,10 +33,10 @@
         PropBase.__init__(self, node, offset, name)
         self.bytes = bytes
         if not bytes:
-            self.type = fdt_util.TYPE_BOOL
+            self.type = fdt.TYPE_BOOL
             self.value = True
             return
-        self.type, self.value = fdt_util.BytesToValue(bytes)
+        self.type, self.value = self.BytesToValue(bytes)
 
     def GetPhandle(self):
         """Get a (single) phandle value from a property
@@ -75,7 +75,7 @@
             self.value = [self.value]
 
         if type(self.value) == list and len(newprop.value) > len(self.value):
-            val = fdt_util.GetEmpty(self.type)
+            val = self.GetEmpty(self.type)
             while len(self.value) < len(newprop.value):
                 self.value.append(val)
 
diff --git a/tools/dtoc/fdt_util.py b/tools/dtoc/fdt_util.py
index 929b524..6b57248 100644
--- a/tools/dtoc/fdt_util.py
+++ b/tools/dtoc/fdt_util.py
@@ -8,72 +8,6 @@
 
 import struct
 
-# A list of types we support
-(TYPE_BYTE, TYPE_INT, TYPE_STRING, TYPE_BOOL) = range(4)
-
-def BytesToValue(bytes):
-    """Converts a string of bytes into a type and value
-
-    Args:
-        A string containing bytes
-
-    Return:
-        A tuple:
-            Type of data
-            Data, either a single element or a list of elements. Each element
-            is one of:
-                TYPE_STRING: string value from the property
-                TYPE_INT: a byte-swapped integer stored as a 4-byte string
-                TYPE_BYTE: a byte stored as a single-byte string
-    """
-    size = len(bytes)
-    strings = bytes.split('\0')
-    is_string = True
-    count = len(strings) - 1
-    if count > 0 and not strings[-1]:
-        for string in strings[:-1]:
-            if not string:
-                is_string = False
-                break
-            for ch in string:
-                if ch < ' ' or ch > '~':
-                    is_string = False
-                    break
-    else:
-        is_string = False
-    if is_string:
-        if count == 1:
-            return TYPE_STRING, strings[0]
-        else:
-            return TYPE_STRING, strings[:-1]
-    if size % 4:
-        if size == 1:
-            return TYPE_BYTE, bytes[0]
-        else:
-            return TYPE_BYTE, list(bytes)
-    val = []
-    for i in range(0, size, 4):
-        val.append(bytes[i:i + 4])
-    if size == 4:
-        return TYPE_INT, val[0]
-    else:
-        return TYPE_INT, val
-
-def GetEmpty(type):
-    """Get an empty / zero value of the given type
-
-    Returns:
-        A single value of the given type
-    """
-    if type == TYPE_BYTE:
-        return chr(0)
-    elif type == TYPE_INT:
-        return struct.pack('<I', 0);
-    elif type == TYPE_STRING:
-        return ''
-    else:
-        return True
-
 def fdt32_to_cpu(val):
     """Convert a device tree cell to an integer
 
